/**
 * 逃生通道类型定义
 */
export interface EvacuationRoute {
  id: number | null
  name: string
  description?: string
  points: Point[]
  color: string
  width: number
  isActive: boolean
  createdAt: string
  updatedAt?: string
  plotJson?:any
}

/**
 * 点位类型
 */
export interface Point {
  x: number
  y: number
  type: PointType
  label?: string
}

/**
 * 点位类型枚举
 */
export enum PointType {
  START = 'start',
  MIDDLE = 'middle',
  END = 'end',
  EXIT = 'exit',
  FIRE_EXTINGUISHER = 'fire_extinguisher',
  DANGER = 'danger'
}

/**
 * 背景地图类型
 */
export interface MapBackground {
  id: number
  name: string
  url: string
  width: number
  height: number
}

/**
 * 导出配置类型
 */
export interface ExportConfig {
  includeTitle: boolean
  includeDescription: boolean
  includeTimestamp: boolean
  width: number
  height: number
  format: 'png' | 'jpg'
  quality: number
}

declare module 'bmap-draw' {
  export class DrawScene {
    constructor(map: any);
    map: any;
    clearData(): void;
  }

  export class PolylineDraw {
    constructor(scene: DrawScene, options?: {
      isOpen?: boolean;
      isOnMap?: boolean;
      enableSnap?: boolean;
      isSelectDraw?: boolean;
      isSeries?: boolean;
    });
    scene: DrawScene;
    overlay: any;
    open(): void;
    closeAll(): void;
  }

  export class PolylineEdit {
    constructor(scene: DrawScene, options?: {
      isOpen?: boolean;
      isOnMap?: boolean;
      enableSnap?: boolean;
      isSelectDraw?: boolean;
      isSeries?: boolean;
    });
    scene: DrawScene;
    overlay: any;
    open(polyline: any): void;
    closeAll(): void;
    addEventListener(event: string, callback: (e: any) => void): void;
  }
} 